﻿using Model;
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using MongoService.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MongoService.Model
{
    [CollectionNameAttribute("CouponBatch")]
    public class CouponBatchEnity : MongoEntityBase
    {
        public CouponBatchEnity() { }
        public CouponBatchEnity(CouponBatch model)
        {
            this.AddTime = model.AddTime;
            this.ApplyDepartment = model.ApplyDepartment;
            this.BatchCode = model.BatchCode;
            this.BatchCreateType = model.BatchCreateType;
            this.BatchId = model.BatchId;
            this.BatchPrefix = model.BatchPrefix;
            this.CouponName = model.CouponName;
            this.CouponNumPerUser = model.CouponNumPerUser;
            this.CouponSettingId = model.CouponSettingId;
            this.CouponTotalNum = model.CouponTotalNum;
            this.ExpiredDate = model.ExpiredDate;
            this.ImpresetInvoiceId = model.ImpresetInvoiceId;
            this.InvalidMemo = model.InvalidMemo;
            this.InvalidStatus = model.InvalidStatus;
            this.InvalidTime = model.InvalidTime;
            this.InvalidUser = model.InvalidUser;
            this.OperatorId = model.OperatorId;
            this.SendType = model.SendType;
            this.Usage = model.Usage;
        }

        /// <summary>
        /// 
        /// </summary>
        public int BatchId { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public DateTime AddTime { get; set; }
        /// <summary>
        /// 预算申请单ID
        /// </summary>
        public string ImpresetInvoiceId { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int CouponTotalNum { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int CouponSettingId { get; set; }
        /// <summary>
        /// 优惠券创建类型
        /// 1：平台创建优惠券
        /// 2：商家创建优惠券
        /// </summary>
        public byte BatchCreateType { get; set; }
        /// <summary>
        /// 优惠券名称
        /// </summary>
        public string CouponName { get; set; }
        /// <summary>
        /// 优惠券前缀
        /// </summary>
        public string BatchPrefix { get; set; }
        /// <summary>
        /// 优惠券作废时间
        /// </summary>
        public DateTime InvalidTime { get; set; }
        /// <summary>
        /// 作废状态(0-未作废 1-已作废)
        /// </summary>
        public bool InvalidStatus { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int OperatorId { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int SendType { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string BatchCode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public DateTime ExpiredDate { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int Usage { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int CouponNumPerUser { get; set; }
        /// <summary>
        /// 申请部门
        /// </summary>
        public int ApplyDepartment { get; set; }
        /// <summary>
        /// 作废人
        /// </summary>
        public string InvalidUser { get; set; }
        /// <summary>
        /// 作废理由
        /// </summary>
        public string InvalidMemo { get; set; }
    }
}
